package com.example.注解和反射.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

public class Test02 {

    @MyAnnotation2(name = "asd")
    public void test(){
    }

    @MyAnnotation3("真不错")
    public void test02(){
    }
}

@Target(value= {ElementType.METHOD,ElementType.TYPE})
@Retention(value= RetentionPolicy.RUNTIME)

@interface MyAnnotation2{
    String name();
    int age() default 0;
    String[] schools() default {"西部开源","清华大学"};

}

@Target(value= {ElementType.METHOD,ElementType.TYPE})
@Retention(value= RetentionPolicy.RUNTIME)

@interface MyAnnotation3{
    String value();

}
